package com.starhub.application.agent.result;

import com.starhub.common.bean.agent.AgentConfig;

import lombok.Data;

@Data
public class AIAgentResult {
    private boolean success;
    private AgentConfig agentConfig;
    private String sessionId;
    private String message;

    public void setAgentConfig(AgentConfig agentConfig) {
        this.agentConfig = agentConfig;
    }

    public AgentConfig getAgentConfig() {
        return agentConfig;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public String getSessionId() {
        return sessionId;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    public static AIAgentResult fail(String message) {
        AIAgentResult result = new AIAgentResult();
        result.setSuccess(false);
        result.setMessage(message);
        return result;
    }

    public static AIAgentResult success(AgentConfig agentConfig, String sessionId, String message) {
        AIAgentResult result = new AIAgentResult();
        result.setAgentConfig(agentConfig);
        result.setSessionId(sessionId);
        result.setSuccess(true);
        result.setMessage(message);
        return result;
    }
}
